#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
    float a = 0;
    int i = 0;
    int p = 0;
    char b;
   while (scanf("%f %c", &a, &b) != EOF) 
     { 
       while (a>1)
       {
           a -= 1;
           i++;
       }
        p += 20;
        p += (i * 1);
        if (b == 121)
        {
            p += 5;
        }
        printf("%d", p);

     }

	return 0;
}